<!DOCTYPE HTML>
<html>
<head>
    <title>接口文档</title>
    <meta http-equiv="pragma" content="no-cache"></meta>
    <meta http-equiv="cache-control" content="no-cache"></meta>
    <meta http-equiv="expires" content="0"></meta>
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"></meta>
    <style>
        body {
            scrollbar-face-color: #DEE3E7;
            scrollbar-highlight-color: #D1D7DC;
            scrollbar-shadow-color: #98AAB1;
            scrollbar-3dlight-color: #ffffff;
            scrollbar-arrow-color: #006699;
            scrollbar-track-color: #EFEFEF;
            scrollbar-darkshadow-color: #EFEFEF;
            margin: 0px;
        }
        #content {
            margin-left: 10px;
            font-size: .70em;
            width:98%;
            text-align:left;
        }
        .code{
            width:500px;
            border: 1px dotted #999;
            margin: 5px;
            padding:10px;
            background-color: #fbfbfb;
        }
        .note{
            border: 1px solid #ddd;
            margin: 3px;
            padding:10px;
            font-size: 9pt;
        }
        P {
            color: #000000;
            margin-top: 0px;
            margin-bottom: 5px;
        }
        pre {
            background-color: #e5e5cc;
            padding: 5px;
            font-size: x-small;
            margin-top: -5px;
            border: 1px #f0f0e0 solid;
        }
        h1 {
            font-size: 20px;
            font-weight: bold;
            margin-top: 10px;
            margin-bottom: 5px;
            margin-left: -10px;
            color: #003366;

        }
        h2 {
            font-size: 17px;
            color: #003366;
            margin-left: 0px;
            margin-top: 10px;
            margin-bottom: 10px;
        }

        h3 {
            font-size: 14px;
            color: #003366;
            margin-left: 5px;
            margin-top: 10px;
            margin-bottom: 10px;
        }
        h4 {
            font-size: 12px;
            color: #003366;
            margin-left: 10px;
            margin-top: 10px;
            margin-bottom: 10px;
        }
        .module{
            width:auto;
            height:13px;
            overflow:hidden;
            border:1px dotted #acc6e9;
            background:#fbfbfb;
            padding-right: 1px;
            padding-left: 1px;
            line-height:13px;
            margin-right: 1px;
            margin-bottom: 1px;
            margin-left: 1px;
            font-size:9px;
        }
        ul {
            margin-top: 10px;
            margin-left: -10px;
        }
        li {
            margin-top: 10px;
            color: #000000;
        }
        .heading {
            color: #ffffff;
            font-size: 26px;
            font-weight: normal;
            background-color: #575b5d;
            margin-top: 0px;
            margin-bottom: 0px;
            margin-left: 0px;
            padding-top: 3px;
            padding-bottom: 3px;
            padding-left: 0px;
            height:30px;
            width: 99%;
        }
        .dataTable {
            margin-top:0px;
            border-spacing: 0;
            border-collapse: collapse;
        }

        .dataTable thead th {
            border: 1px solid #ddd;
            background-color: #F8F8F8;
            height:30px;
        }
        .dataTable tbody tr {
            border: 1px solid #ddd;
            background-color: #ffffff;
        }
        .dataTable tbody tr[odd='false']{
            background-color: #efefef;
        }
        .dataTable tbody tr td{
            border: 1px solid #ddd;
            height:30px;
            padding:0 2px 0 2px;
            text-align:center;
        }
    </style>
</head>
<body style="font-family: SimSun;">
<br/><br/><br/>
<div style="height: 70px;width: 100%;text-align:center;font-size: 35px;font-weight: bold">${app.note}接口文档</div>
<br/>
<div id="content">
<#list modelMaps as modelMap>
    <h1>● ${modelMap.api.name}</h1>
    <h2>${modelMap.section.index}、基本信息</h2>
    <table  cellpadding="0" border="0" cellspacing="0" style="width: 97%;padding-left: 0px;">
        <tr>
            <td width="70" height="30" align="right">接口名称：</td>
            <td>${modelMap.api.name}</td>
            <td align="right">接口编号：</td>
            <td>${modelMap.api.no!}</td>
            <td align="right">负责人：</td>
            <td>${modelMap.api.author!}</td>
        </tr>
        <tr>
            <td height="30" align="right">接口状态：</td>
            <td><#if modelMap.api.completed>已完成<#else>开发中</#if></td>
            <td align="right">更新者：</td>
            <td>${modelMap.api.creator!}</td>
            <td height="30" align="right">更新时间：</td>
            <td>${modelMap.api.createDt}</td>
        </tr>
    </table>
    <div class="note" style="width:97%;margin-left:0px">
        <p>☆请求路径：${modelMap.api.path!}</p>
        <p>☆请求方法：${modelMap.api.requestMethod}</p>
        <#list modelMap.officialEnvs as env>
            <p>★${env.name!}环境：${env.basePath}${modelMap.api.path}</p>
        </#list>
    </div>
    <h2>${modelMap.section.index}、请求</h2>
    <#if modelMap.headerTable ??>
        <h3>${modelMap.section.index2} 请求Headers</h3>
        <table style="width:100%;" border="0" cellpadding="0" cellspacing="0" class="dataTable">
            <thead>
            <tr>
                <th width="100" align="center"><strong>参数名</strong></th>
                <th width="100" align="center"><strong>中文描述</strong></th>
                <th width="80" align="center"><strong>数据类型</strong></th>
                <th width="70" align="center"><strong>是否必需</strong></th>
                <th width="70" align="center"><strong>长度限制</strong></th>
                <th width="80" align="center"><strong>最小值</strong></th>
                <th width="80" align="center"><strong>最大值</strong></th>
                <th width="100" align="center"><strong>示例</strong></th>
                <th width="150" align="left"><strong>参数说明</strong></th>
            </tr>
            </thead>
            <tbody>
            <#list modelMap.headerTable.rows as row>
                <tr>
                    <#list row as cell>
                        <td  style="${cell.style!}" rowspan="${cell.rowspan}">
                            <#if cell.href??>
                                <a href="${cell.href}"><font color="blue"><b>${cell.value!}</b></font></a>
                            <#else>
                                ${cell.value!}
                            </#if>
                        </td>
                    </#list>
                </tr>
            </#list>
            </tbody>
        </table>
        <br/>
    </#if>

    <#if modelMap.pathVarTable ??>
        <h3>${modelMap.section.index2}、请求路径参数说明</h3>
        <table style="width:100%;" border="0" cellpadding="0" cellspacing="0" class="dataTable">
            <thead>
            <tr>
                <th width="100" align="center"><strong>参数名</strong></th>
                <th width="100" align="center"><strong>中文描述</strong></th>
                <th width="80" align="center"><strong>数据类型</strong></th>
                <th width="70" align="center"><strong>是否必需</strong></th>
                <th width="70" align="center"><strong>长度限制</strong></th>
                <th width="80" align="center"><strong>最小值</strong></th>
                <th width="80" align="center"><strong>最大值</strong></th>
                <th width="100" align="center"><strong>示例</strong></th>
                <th width="150" align="left"><strong>参数说明</strong></th>
            </tr>
            </thead>
            <tbody>
            <#list modelMap.pathVarTable.rows as row>
                <tr>
                    <#list row as cell>
                        <td  style="${cell.style!}" rowspan="${cell.rowspan}">
                            <#if cell.href??>
                                <a href="${cell.href}"><font color="blue"><b>${cell.value!}</b></font></a>
                            <#else>
                                ${cell.value!}
                            </#if>
                        </td>
                    </#list>
                </tr>
            </#list>
            </tbody>
        </table>
        <br/>
    </#if>
    <#if (modelMap.paramTables ??) && (modelMap.paramTables?size>0) >
        <h3>${modelMap.section.index2}、请求Params说明</h3>
        <#list modelMap.paramTables as table>
            <#if table_index !=0><h4 id="${table.id!}">★${table.name!}</h4></#if>
            <table style="width:100%;" border="0" cellpadding="0" cellspacing="0" class="dataTable">
                <thead>
                <tr>
                    <th width="100" align="center"><strong>参数名</strong></th>
                    <th width="100" align="center"><strong>中文描述</strong></th>
                    <th width="80" align="center"><strong>数据类型</strong></th>
                    <th width="70" align="center"><strong>是否必需</strong></th>
                    <th width="70" align="center"><strong>长度限制</strong></th>
                    <th width="80" align="center"><strong>最小值</strong></th>
                    <th width="80" align="center"><strong>最大值</strong></th>
                    <th width="100" align="center"><strong>示例</strong></th>
                    <th width="150" align="left"><strong>参数说明</strong></th>
                </tr>
                </thead>
                <tbody>
                <#list table.rows as row>
                    <tr>
                        <#list row as cell>
                            <td  style="${cell.style!}" rowspan="${cell.rowspan}">
                                <#if cell.href??>
                                    <a href="${cell.href}"><font color="blue"><b>${cell.value!}</b></font></a>
                                <#else>
                                    ${cell.value!}
                                </#if>
                            </td>
                        </#list>
                    </tr>
                </#list>
                </tbody>
            </table>
            <br/>
        </#list>
    </#if>
    <#if (modelMap.bodyTables ??) && (modelMap.bodyTables?size>0) >
        <h3>${modelMap.section.index2}、请求Body说明</h3>
        <#list modelMap.bodyTables as table>
            <#if table_index !=0><h4 id="${table.id!}">★${table.name!}</h4></#if>
            <table style="width:100%;" border="0" cellpadding="0" cellspacing="0" class="dataTable">
                <thead>
                <tr>
                    <th width="100" align="center"><strong>参数名</strong></th>
                    <th width="100" align="center"><strong>中文描述</strong></th>
                    <th width="80" align="center"><strong>数据类型</strong></th>
                    <th width="70" align="center"><strong>是否必需</strong></th>
                    <th width="70" align="center"><strong>长度限制</strong></th>
                    <th width="80" align="center"><strong>最小值</strong></th>
                    <th width="80" align="center"><strong>最大值</strong></th>
                    <th width="100" align="center"><strong>示例</strong></th>
                    <th width="150" align="left"><strong>参数说明</strong></th>
                </tr>
                </thead>
                <tbody>
                <#list table.rows as row>
                    <tr>
                        <#list row as cell>
                            <td  style="${cell.style!}" rowspan="${cell.rowspan}">
                                <#if cell.href??>
                                    <a href="${cell.href}"><font color="blue"><b>${cell.value!}</b></font></a>
                                <#else>
                                    ${cell.value!}
                                </#if>
                            </td>
                        </#list>
                    </tr>
                </#list>
                </tbody>
            </table>
            <br/>
        </#list>
    </#if>
    <h3>${modelMap.section.index2}、Rest请求示例</h3>
    <p style="margin-left: 10px;">☆请求地址：${modelMap.api.requestMethod} http://{ip}:{port}${modelMap.servletPath}</p>
    <#if modelMap.requestHeaders ??>
        <p style="margin-left: 10px;font-weight: bold"> 请求Headers</p>
        <div class="code" style="width:97%;margin-left:0px">
            ${modelMap.requestHeaders!}
        </div>
    </#if>
    <#if modelMap.requestParams ??>
        <p style="margin-left: 10px;">☆请求Params</p>
        <div class="code" style="width:97%;margin-left:0px">
            ${modelMap.requestParams!}
        </div>
    </#if>
    <#if modelMap.requestBody ??>
        <p style="margin-left: 10px;">☆请求Body</p>
        <div class="code" style="width:97%;margin-left:0px">
            ${modelMap.requestBody!}
        </div>
    </#if>
    <#if modelMap.api.rpc ??>
        <h3>${modelMap.section.index2}、Rpc请求示例</h3>
        <#if modelMap.api.rpc.dependency ??>
            <p style="margin-left: 10px;">☆Maven依赖</p>
            <ul class="code" style="width:97%;margin-left:0px;padding:10px;height: 100px;">
                <li style="list-style-type:none;margin: 0px 0px 5px 0px;">&lt;dependency&gt;</li>
                <li style="list-style-type:none;margin-left: 15px;margin-top: 5px;">&lt;groupId&gt;${modelMap.api.rpc.dependency.groupId}&lt;/groupId&gt;</li>
                <li style="list-style-type:none;margin-left: 15px;margin-top: 5px;">&lt;artifactId&gt;${modelMap.api.rpc.dependency.artifactId}&lt;/artifactId&gt;</li>
                <li style="list-style-type:none;margin-left: 15px;margin-top: 5px;">&lt;version&gt;${modelMap.api.rpc.dependency.version}&lt;/version&gt;</li>
                <li style="list-style-type:none;margin-left: 0px;margin-top: 5px;">&lt;/dependency&gt;</li>
            </ul>
        </#if>
        <p style="margin-left: 10px;">☆JAVA代码示例</p>
        <ul class="code" style="width:97%;margin-left:0px;">
            <#list modelMap.api.rpc.imports as import>
                <li style="list-style-type:none;margin-left: 0px;margin-bottom: 2px;margin-top: 2px;"><span style="color: red ">import</span> ${import};</li>
            </#list>
            <li style="list-style-type:none;margin-left: 0px;margin-bottom: 2px;margin-top: 2px;"><span style="color: red ">import</span> javax.annotation.Resource;</li>
            <li style="list-style-type:none;margin-left: 0px;margin-bottom: 2px;margin-top: 2px;"><span style="color: red ">import</span> org.springframework.stereotype.Component;</li>

            <li style="list-style-type:none;margin-left: 0px;"></li>
            <li style="list-style-type:none;margin-left: 0px;"></li>
            <li style="list-style-type:none;margin-left: 0px;margin-bottom: 0"><span style="color: #a5a508">@Component</span></li>
            <li style="list-style-type:none;margin-left: 0px;margin-top: 0;"><span style="color: red ">public class</span> Demo{</li>
            <li style="list-style-type:none;margin-left: 20px;margin-bottom: 0"><span style="color: #a5a508">@Resource</span></li>
            <li style="list-style-type:none;margin-left: 20px;margin-top: 0"><span style="color: red ">private </span>${modelMap.api.rpc.fieldString};</li>
            <li style="list-style-type:none;margin-left: 20px;"><span style="color: red ">public</span> void test(){</li>
            <#list modelMap.api.rpc.codes as code>
                <li style="list-style-type:none;margin-left: 40px;">${code};</li>
            </#list>
            <li style="list-style-type:none;margin-left: 20px;">}</li>
            <li style="list-style-type:none;margin-left: 0px;">}</li>
        </ul>
    </#if>
    <#if (modelMap.responseTables ??) && (modelMap.responseTables?size>0) >
        <h2>${modelMap.section.index}、响应</h2>
        <h3>${modelMap.section.index2}、响应体参数说明</h3>
        <#list modelMap.responseTables as table>
            <#if table_index !=0><h4 id="${table.id!}">★${table.name!}</h4></#if>
            <table style="width:100%;" border="0" cellpadding="0" cellspacing="0" class="dataTable">
                <thead>
                <tr>
                    <th width="100" align="center"><strong>参数名</strong></th>
                    <th width="100" align="center"><strong>中文描述</strong></th>
                    <th width="100" align="center"><strong>数据类型</strong></th>
                    <th width="100" align="center"><strong>客户端</strong></th>
                    <th width="100" align="center"><strong>示例</strong></th>
                    <th align="left"><strong>参数说明</strong></th>
                </tr>
                </thead>
                <tbody>
                <#list table.rows as row>
                    <tr>
                        <#list row as cell>
                            <td style="text-align:center;${cell.style!}" rowspan="${cell.rowspan}">
                                <#if cell.href??>
                                    <a href="${cell.href}"><font color="blue"><b>${cell.value!}</b></font></a>
                                <#else>
                                    ${cell.value!}
                                </#if>
                            </td>
                        </#list>
                    </tr>
                </#list>
                </tbody>
            </table>
            <br/>
        </#list>
        <h3>${modelMap.section.index2}、响应示例</h3>
        <div class="code" style="width:97%;margin-left:0px">
            ${modelMap.responseData!}
        </div>
    </#if>
    <#if modelMap.api.note ??>
        <h2>${modelMap.section.index}、备注说明</h2>
        <p style="margin-left: 30px;">${modelMap.api.note!}</p>
    </#if>
</#list>
</div>
</body>
</html>
